package com.quanyan.place.service;

import com.quanyan.api.APIResponse;
import com.quanyan.place.entity.TbBizPlaceUnitSalePlan;
import com.quanyan.place.entity.apireq.ReqPlaceCreateCombinedUnit;
import com.quanyan.place.entity.apireq.ReqPlaceDeleteCombinedUnit;
import com.quanyan.place.entity.apireq.ReqPlaceUpdateCombinedUnit;
import com.quanyan.place.entity.apiresp.RespPlaceUnitSalePlanDetail;
import com.quanyan.place.entity.vo.PlaceCombinedUnitVo;

import java.util.List;


/**
 * Created by yuanxuebing on 16/11/14.
 */
public interface PlaceUnitCombineService {
    APIResponse getCombinedUnitById(Integer cuId);

    APIResponse listCombinedUnits(Integer placeId, Integer cateId);

    APIResponse listUncombinedSubUnits(Integer placeId, Integer cateId, String scale);

    APIResponse createCombinedUnit(ReqPlaceCreateCombinedUnit req) throws Exception;

    APIResponse deleteCombinedUnit(ReqPlaceDeleteCombinedUnit req) throws Exception;

    APIResponse updateCombinedUnit(ReqPlaceUpdateCombinedUnit req) throws Exception;

    // 将原有的按天返回的基本单位的销售计划,组合成组成场地的销售计划
    APIResponse combinePlaceUnit(Integer placeId, Integer cateId, String scale, Long startDateMS, Long endDateMS,
                                 RespPlaceUnitSalePlanDetail placeUnitSalePlanVo);

    APIResponse fixPlaceUnitSalePlanDetail(RespPlaceUnitSalePlanDetail detail, List<TbBizPlaceUnitSalePlan> tbBizPlaceUnitSalePlanList);


    List<PlaceCombinedUnitVo> getCombinedUnits(Integer placeId, Integer cateId, String scale);
}
